﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Soveryn.Commerce.Shared;

public partial class AddressDisplay : System.Web.UI.UserControl
{
    public bool NicknameVisible = true;
    public bool CompanyVisible = true;
    public bool FirstNameVisible = true;
    public bool LastNameVisible = true;
    public bool Address1Visible = true;
    public bool Address2Visible = true;
    public bool PhoneVisible = true;
    public bool PhoneSecondaryVisible = true;
    public bool FaxVisible = true;
    public bool CityVisible = true;
    public bool CountryVisible = true;
    public bool StateVisible = true;
    public bool PostalCodeVisible = true;

    public AddressProperties Address = new AddressProperties();

    protected void Page_Load(object sender, EventArgs e)
    {

        CompanyNameLabel.Text = Address.AddressCompanyName;
        FirstNameLabel.Text = Address.AddressFirstName;
        LastNameLabel.Text = Address.AddressLastName;
        NicknameLabel.Text = Address.AddressNickName;
        Line1Label.Text = Address.AddressLine1;
        Line2Label.Text = Address.AddressLine2;
        CityLabel.Text = Address.AddressCity;
        CountryLabel.Text = Address.AddressCountryIDPostalAbrev;
        StateLabel.Text = Address.AddressStateProvIDPostalAbrev;
        PostalCodeLabel.Text = Address.AddressPostalCode;
        PhoneLabel.Text = Address.AddressPhone;
        PhoneSecondaryLabel.Text = Address.AddressPhoneSecondary;
        FaxLabel.Text = Address.AddressFax;

        NicknameLabel.Visible = NicknameVisible;
        CompanyNameLabel.Visible = CompanyVisible;
        FirstNameLabel.Visible = FirstNameVisible;
        LastNameLabel.Visible = LastNameVisible;
        Line1Label.Visible = Address1Visible;
        Line2Label.Visible = Address2Visible;
        PhoneLabel.Visible = PhoneVisible;
        PhoneSecondaryLabel.Visible = PhoneSecondaryVisible;
        FaxLabel.Visible = FaxVisible;
        CityLabel.Visible = CityVisible;
        CountryLabel.Visible = CountryVisible;
        StateLabel.Visible = StateVisible;
        PostalCodeLabel.Visible = PostalCodeVisible;

    }
}